<template>
  <div>
     <MyDog @xiugou="fn" v-for="(item,index) in arr" :key="index" :name="item"></MyDog>
      <ul>
        <li v-for="(item,index) in arr1" :key="index">{{item}}</li>
      </ul>
   </div>
</template>
 
<script>
import MyDog from "./components/MyDog.vue"
export default {
  components: {
    MyDog,
  },
  props: {},
  data() {
    return {
      arr:['孤独狗','比熊','博美','哈士奇','金毛','萨摩耶'],
      arr1:[]
    };
  },
  computed: {},
  watch: {},
  created() {},
  methods: {
    fn(e){
      this.arr1.push(e)
    }
  }
};
</script>

<style scoped>
     ul {
      float: left;
     }
</style>